import axios from "@/request/http";
import Qs from "qs";

export default {
  namespaced: true,
  //<!-- 在.vue文件中通过this.$store.state.xxx来进行获取 -->
  state: {
    list: [],
  },

  mutations: {
    DING_DAN(state, data) {
      state.list = data;
    },
  },

  actions: {
    init({ commit }) {
      axios.get("/user/info").then((data) => {
        commit("DING_DAN", data.data);
      });
    },

    // AlTER_USER({ commit }) {
    //   axios.post("/user/updatePassword").then((data) => {
    //     console.log(data);
    //   });
    // },
  },
};
